package cn.edu.besti.cs1723.DZX2304;

public class SortingTest {
    public static void main(String[] args) {
        Comparable a[] = {10, 25, 2304,  44, 56, 11, 9, 8};
        Sorting b = new Sorting();
       Sorting.selectionSort(a);
        System.out.println("选择排序后的数组");
        for(Comparable c:a)
        {
            System.out.print(c+" ");
        }
        System.out.println();
        Comparable a2[]= {10, 25, 2304,  44, 56, 11, 9, 8};
         Sorting.insertionSort(a2);
        System.out.println("插入排序后的数组");
        for(Comparable c:a2)
        {
            System.out.print(c+" ");
        }
        System.out.println();
        Comparable a3[]= {10, 25, 2304,  44, 56, 11, 9, 8};
        Sorting.quickSort(a3);
        System.out.println("快速排序后的数组");
        for(Comparable c:a3)
        {
            System.out.print(c+" ");
        }
        System.out.println();
        Comparable a4[]= {10, 25, 2304,  44, 56, 11, 9, 8};
        Sorting.shellSort(a4);
        System.out.println("希尔排序后的数组");
        for(Comparable c:a4)
        {
            System.out.print(c+" ");
        }
        System.out.println();
        Comparable a5[]= {10, 25, 2304,  44, 56, 11, 9, 8};
        Sorting.heapSort(a5);
        System.out.println("堆排序后的数组");
        for(Comparable c:a5)
        {
            System.out.print(c+" ");
        }
        System.out.println();
        Comparable a6[]= {10, 25, 2304,  44, 56, 11, 9, 8};
        Sorting.binarySearchTreeSort(a6);
        System.out.println("二叉查找树排序后的数组");
        for(Comparable c:a6)
        {
            System.out.print(c+" ");
        }
        Comparable[] a7={10, "a", 2304,  44, "b", 11, 9, 8};
        Sorting.binarySearchTreeSort(a7);
        System.out.println("二叉查找树排序后的数组");
        for(Comparable c:a7)
        {
            System.out.print(c+" ");
        }
    }
}